home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <exec/ports.h>
- #include <dos/dos.h>
- #include <clib/exec_protos.h>
- #include <clib/alib_protos.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "MultiChat.h"
- #include <doorheader.h>
- #include "ChatMsg.h"
-
- void CheckMsg(struct StatusStruct *Status)
- {
- struct StatusStruct
- {
- UWORD Status;
- char Text;
- char Sender[30];
- };
-
- struct MsgPort *ChatPort;
- struct ChatMsgStruct *ChatMsg;
-
- extern char *PortNames[];
- char NodeNr_char[200];
-
- UWORD NodeNr;
-
-
- getuserstring(NodeNr_char, BB_NODEID);
- NodeNr = atoi(NodeNr_char);
-
- ChatPort = FindPort(PortNames[NodeNr]);
- if (ChatPort)
- {
- Status->Status = NO_CHATMSG;
-
- if (ChatMsg = (struct ChatMsgStruct *)GetMsg(ChatPort))
- {
- Status->Text = ChatMsg->Text;
-
- Status->Status = CHATMSG;
- ReplyMsg((struct Message *)ChatMsg);
- }
- }
- }
-